var assert = require('assert');
var should = require('should');
var _ = require('lodash');
var pvpConf = require('../../app/config/pvpConf.js');
var dataApi = require('../../app/libs/dataApi');

suite('pvpConfTest', function () {
    suite('pvpConfTest', function () {
        test('测试军功区间分段', function () {
            pvpConf.getHonorLvl(0).id.should.equal(1);
            pvpConf.getHonorLvl(100).id.should.equal(1);
            pvpConf.getHonorLvl(200).id.should.equal(2);
            //console.log('test:', pvpConf.getHonorLvl(800).id);
            pvpConf.getHonorLvl(800).id.should.equal(3);
            pvpConf.getHonorLvl(900).id.should.equal(3);
            pvpConf.getHonorLvl(1501).id.should.equal(4);
            pvpConf.getHonorLvl(2501).id.should.equal(5);
            pvpConf.getHonorLvl(5000).id.should.equal(5);
        });

        test('测试军功宝箱品质概率', function () {
            dataApi.honor_box_form.findById(1)[0].id.should.equal(1);
            dataApi.honor_box_form.findById(2)[0].id.should.equal(2);
            dataApi.honor_box_form.findById(3)[0].id.should.equal(3);
            dataApi.honor_box_form.findById(4)[0].id.should.equal(4);
            dataApi.honor_box_form.findById(5)[0].id.should.equal(5);
            //console.log(dataApi.honor_box_form.findById(3));
        });
        test('测试军功宝箱品质概率', function () {
            dataApi.honor_box.findById(1)[0].id.should.equal(1);
            dataApi.honor_box.findById(2)[0].id.should.equal(2);
            dataApi.honor_box.findById(3)[0].id.should.equal(3);
        });
    });
});
